package com.application.chiettinhdienluc.model;

import android.annotation.SuppressLint;
import java.io.Serializable;
import java.util.ArrayList;

@SuppressWarnings("serial")
public class VatTuChiTietModel implements Serializable {
	
	//table column names
	private int vatTuChiTietId = -1 ;
	private String bangChietTinhId ;
	private String maVatTu ;
	private String tenVatTu ;
	private String quyCach ;
	private double dongia ;
	private double soluong ;
	private double thanhtien ;
	private String madonviquanly ;
	private int hosochiettinhid ;
	private boolean isCheck;
	private int lan;
	private String trangthai;
	private String tongtien;
		
	public String getTrangthai() {
		return trangthai;
	}

	public void setTrangthai(String trangthai) {
		this.trangthai = trangthai;
	}

	public int getLan() {
		return lan;
	}

	public void setLan(int lan) {
		this.lan = lan;
	}

	// Empty constructor
	public VatTuChiTietModel() {

	}
	
	public int getVatTuChiTietId() {
		return vatTuChiTietId;
	}

	public void setVatTuChiTietId(int vatTuChiTietId) {
		this.vatTuChiTietId = vatTuChiTietId;
	}

	public String getBangChietTinhId() {
		return bangChietTinhId;
	}

	public void setBangChietTinhId(String id) {
		this.bangChietTinhId = id;
	}

	public String getMaVatTu() {
		return maVatTu;
	}

	public void setMaVatTu(String mavattu) {
		this.maVatTu = mavattu;
	}
	
	public String getTenVatTu() {
		return tenVatTu;
	}

	public void setTenVatTu(String ten) {
		this.tenVatTu = ten;
	}

	public String getQuyCach() {
		return quyCach;
	}

	public void setQuyCach(String quycach) {
		this.quyCach = quycach;
	}

	public double getDonGia() {
		return dongia;
	}

	public void setDonGia(	double dongia) {
		this.dongia = dongia;
	}

	public double getSoLuong() {
		return soluong;
	}

	public void setSoLuong(double soluong) {
		this.soluong = soluong;
	}

	public double getThanhTien() {
		return thanhtien;
	}

	public void setThanhTien(double thanhtien) {
		this.thanhtien = thanhtien;
	}


	public String getMaDonViQuanLy() {
		return madonviquanly;
	}

	public void setMaDonViQuanLy(String madonviquanly) {
		this.madonviquanly = madonviquanly;
	}
	

	public int getHoSoChietTinhId() {
		return hosochiettinhid;
	}

	public void setHoSoChietTinhId(int hosochiettinhid) {
		this.hosochiettinhid = hosochiettinhid;
	}
	
	public boolean isCheck() {
		return isCheck;
	}

	public void setCheck(boolean isCheck) {
		this.isCheck = isCheck;
	}

	public String getTongtien() {
		return tongtien;
	}

	public void setTongtien(String tongtien) {
		this.tongtien = tongtien;
	}
	private int order;
	
	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}
	
private Long chiTietId;
	
	public Long getChiTietId() {
		return chiTietId;
	}

	public void setChiTietId(Long chiTietId) {
		this.chiTietId = chiTietId;
	}
	
	@SuppressLint("UseValueOf")
	public String getJsonString(){
		 
		   String json = "{\"chitietId\": \""+ chiTietId +
					"\", \"banctinhId\": \""+ bangChietTinhId +
					"\", \"maVattu\": \""+ maVatTu +
					"\", \"donGia\": \"" + new Double(dongia).longValue() + 
					"\", \"soLuong\": \""+ soluong +
					"\", \"thanhTien\": \""+ new Double(thanhtien).longValue()  + 
					"\", \"lan\": \""+ 1 +
					"\",\"trangThai\": \""+ 1 +
					"\",\"maDviqly\": \""+madonviquanly+"\"}";
		   
		   return json;
			   
	}
	
}
